#include<iostream>
#include<queue>
#include"Queue.h"
#include"Stcak.h"

using namespace std;

void TestPriority_queue()
{
	vector<int> v{1, 2, 5, 7, 0, 6, 4};

	Priority_Queue<int, vector<int>, Greater<int>> pq(v.begin(), v.end());


	while (!pq.empty())
	{
		cout << pq.top() << " ";
		pq.pop();
	}
	cout << endl;
}

void TestStack()
{
	Stack<int> st;
	st.push(1);
	st.push(2);
	st.push(3);
	st.push(4);
	st.push(5);

	while (!st.empty())
	{
		cout << st.top() << " ";
		st.pop();
	}

	cout << endl;
}

void TestQueue()
{

	Queue<int> q;
	q.push(1);
	q.push(2);
	q.push(3);
	q.push(4);
	q.push(5);
	cout << q.front() << " ";
	cout << q.back() << endl;


	while (!q.empty())
	{
		cout << q.front() << " ";
		q.pop();
	}

	cout << endl;
}

int main()
{
	TestPriority_queue();
	return 0;
}